package GUILayer;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JTextField;
import java.awt.Dialog.ModalityType;

public class ViewInvoice extends JDialog
{

	private final JPanel contentPanel = new JPanel();
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args)
	{
		try
		{
			ViewInvoice dialog = new ViewInvoice();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public ViewInvoice()
	{
		setModalityType(ModalityType.APPLICATION_MODAL);
		setTitle("View invoice");
		setBounds(100, 100, 284, 212);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		{
			JLabel lblInvoiceNo = new JLabel("Invoice no:");
			lblInvoiceNo.setBounds(10, 11, 100, 14);
			contentPanel.add(lblInvoiceNo);
		}
		{
			textField = new JTextField();
			textField.setEnabled(false);
			textField.setBounds(120, 8, 130, 20);
			contentPanel.add(textField);
			textField.setColumns(10);
		}
		{
			textField_1 = new JTextField();
			textField_1.setEnabled(false);
			textField_1.setColumns(10);
			textField_1.setBounds(120, 36, 130, 20);
			contentPanel.add(textField_1);
		}
		{
			JLabel lblPaymentDate = new JLabel("Payment date:");
			lblPaymentDate.setBounds(10, 39, 100, 14);
			contentPanel.add(lblPaymentDate);
		}
		{
			textField_2 = new JTextField();
			textField_2.setEnabled(false);
			textField_2.setColumns(10);
			textField_2.setBounds(120, 67, 130, 20);
			contentPanel.add(textField_2);
		}
		{
			JLabel lblAmount = new JLabel("Amount:");
			lblAmount.setBounds(10, 70, 100, 14);
			contentPanel.add(lblAmount);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}

}
